<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="com.blockchain.front.service.trading.entity.XxcsEntity"%>
<%@page import="com.blockchain.front.service.trading.entity.HqEntity"%>
<%@page import="com.blockchain.front.service.trading.entity.WtEntity"%>
<%@page import="com.blockchain.common.enums.JymmType"%>
<%@page import="com.blockchain.front.servlets.trading.ajax.WtCjjl"%>
<%@page import="com.blockchain.front.servlets.trading.ajax.WtMc"%>
<%@page import="com.blockchain.front.servlets.trading.ajax.WtMr"%>
<%@page import="com.blockchain.front.servlets.trading.ajax.Hq"%>
<%@page import="com.blockchain.front.service.trading.entity.XlbEntity"%>
<%@page import="com.blockchain.front.servlets.financial.CxWt"%>
<%@page import="com.blockchain.front.service.financial.entity.JlEntity"%>
<%@page import="com.blockchain.front.service.trading.TradingManage"%>
<%@page
	import="com.blockchain.front.service.financial.entity.UserZhEntity"%>
<%@page import="com.blockchain.front.service.financial.FinancialManage"%>
<%@page import="com.blockchain.common.enums.IsPass"%>
<html>
<head>
<%
		String str = languageDefine.getValue(request, "menu_tradeCenter");
		String _TITLE_ = str+"- "+configureProvider.getProperty(SystemVariable.SITE_NAME);
		int scid = IntegerParser.parse(request.getParameter("id"));
		FinancialManage financialManage = serviceSession.getService(FinancialManage.class);
		TradingManage tradingManage = serviceSession.getService(TradingManage.class);
		XlbEntity b = tradingManage.getB(scid);
		HqEntity[] hqlist = tradingManage.hqList();
		XxcsEntity[] cylj=tradingManage.cyljSearch(scid);
		XxcsEntity[] xxcs_f=tradingManage.xxcsSearch(scid,IsPass.F);
		XxcsEntity[] xxcs_s=tradingManage.xxcsSearch(scid,IsPass.S);
		JYZX_SELECT_TABLE_INDEX = 1;
%>
<title><%=_TITLE_%></title>
<%@include file="/WEB-INF/include/meta.jsp"%>
<%@include file="/WEB-INF/include/style.jsp"%>
</head>
<!--菜单-->
<%@include file="/WEB-INF/include/trading/left.jsp"%>
<body>
	<div class="header bg_w"
		style="position: fixed; z-index: 99; height: 120px;">
		<!--头部-->
		<%@include file="/WEB-INF/include/trading/header.jsp"%>
		<!--交易行情-->
		<%@include file="/WEB-INF/include/trading/hq.jsp"%>
</div>
	<div class="wrapbody">
		<div class="main">
			<div class="myright"
				style="width: 1200px; padding: 0px;">
				<div class="wraphtml">


					<div class="autobox mt20 clear" style="padding-top: 0px;">
						<div class="maintain-content">
							<div class="coin-intro">
								<h4 class="intro-title" style="margin-top: 0;">(<%StringHelper.filterHTML(out, b.ywm_s);%>)<%=languageDefine.getValue(request, "intro_intro")%></h4>
								<div class="left-icon-area">
									<div
										style="width: 80px; height: 80px; border: 1px solid #dcdcdc;">
										<img width="80" height="80"
											src="<%if(!StringHelper.isEmpty(b.tblj)){%><%=fileStore.getURL(b.tblj)%><%}%>" alt="">
									</div>
								</div>
								<div class="right-detail-area">
									<div style="border-bottom: 1px dotted #dcdcdc;">
										<h4 class="coin-detail-title">(<%StringHelper.filterHTML(out, b._ywm_s);%>  <%=languageDefine.getValue(request, "intro_abbreviation")%>：<%StringHelper.filterHTML(out, b.ywm_s);%>)</h4>
										<h5
											style="padding: 8px 0; font-weight: normal; color: #777; text-align: left;"><%=languageDefine.getValue(request, "intro_release")%>：<%=TimestampParser.format(b.tcrq,"yyyy-MM-dd")%></h5>
									</div>
									<p style="">
										<%=backgroundDataFlag==2?b.descEn:backgroundDataFlag==3?b.descTw:b.desc %>
									</p>
								</div>
							</div>
							<div class="link-cc">
								<h4 class="intro-title"><%=languageDefine.getValue(request, "intro_commonLinks")%></h4>
								<ul>
								<%if(cylj!=null){for(XxcsEntity x:cylj){ %>
									<li>
										<a target="_blank"
										class="btn-usul" href="<%StringHelper.filterHTML(out, x.dz);%>">
											<%=backgroundDataFlag==2?x.linkNameOrParamEn:backgroundDataFlag==3?x.linkNameOrParamTw:x.mc %>
										</a>
									</li>
								<%}}%>	
								</ul>
							</div>
							<div class="detail-Parameter">
								<h4 class="intro-title"><%=languageDefine.getValue(request, "intro_specification")%></h4>
								<table class="Parameter-table">
									<tbody>
										
										<%StringBuilder h=new StringBuilder();if(xxcs_f!=null){int i=1;for(XxcsEntity f: xxcs_f){
										h.append("<td>");
										h.append(backgroundDataFlag==2?f.linkNameOrParamEn:backgroundDataFlag==3?f.linkNameOrParamTw:f.nr);
										h.append("</td>");
										if(i==3||i%3==0){
										h.append("</tr>");
										h.append("<tr>");
										}
										%>
										<%i++;}}%>
										<tr><%=h.toString()%></tr>
										<%if(xxcs_s!=null){for(XxcsEntity s: xxcs_s){%>
										<tr>
											<td colspan="3"><%=backgroundDataFlag==2?s.linkNameOrParamEn:backgroundDataFlag==3?s.linkNameOrParamTw:s.nr %></td>
										</tr>
										<%}}%>
									</tbody>
								</table>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
	</div>


<%@include file="/WEB-INF/include/footer.jsp"%>
<%@include file="/WEB-INF/include/script.jsp"%>
<script type="text/javascript">
var scid=<%=scid%>;
var hq_url='<%=controller.getURI(request, Hq.class)%>';
$(function(){
hq();//行情
window.setInterval("hq();",2000);
});
function hq(){//行情
var data = {"scid" : scid};
	$.ajax({
		type : "post",
		dataType : "html",
		url : hq_url,
		data : data,
		success : function(data) {
			var ct = eval('(' + data + ')');
			if (ct.num>0) {
			$("#market_new_price").html(ct.msg.dqj);
			$("#market_max_price").html(ct.msg.zgj);
			$("#market_min_price").html(ct.msg.zdj);	
			$("#market_buy_price").html(ct.msg.mr_yj);
			$("#market_sell_price").html(ct.msg.mc_yj);
			$("#market_volume").html(ct.msg.cjl);
			$("#market_change").html(ct.msg.rzd+"%"); 
			if(ct.msg.rzd>=0){
				$('#market_change').removeClass('green');
			    $('#market_change').addClass('text_red');
			}
			scid=ct.msg.scid;
			}
		}
	});
}
</script>
</body>
</html>

